# get local dir
LOCAL_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
LOCAL_DIR := $(dir $(LOCAL_PATH))

################################## local re-implement ##############################
INCLUDE_DIRS += $(LOCAL_DIR)/include/
SRC_DIRS += hdf/src
SRC_DIRS += hdf/src/osal

################################## direct ref to hdf source codes ##################
# hdf source reference
HDF_CORE_ROOT = /Users/nickyang/code/ohos/clone/drivers_hdf_core

HDF_FWK_HOME = $(HDF_CORE_ROOT)/framework
HDF_ADP_HOME = $(HDF_CORE_ROOT)/adapter

INCLUDE_DIRS += $(HDF_CORE_ROOT)/interfaces/inner_api/utils/
INCLUDE_DIRS += $(HDF_CORE_ROOT)/interfaces/inner_api/osal/uhdf/
INCLUDE_DIRS += $(HDF_CORE_ROOT)/interfaces/inner_api/osal/shared/
INCLUDE_DIRS += $(HDF_CORE_ROOT)/interfaces/inner_api/host/shared/
INCLUDE_DIRS += $(HDF_CORE_ROOT)/interfaces/inner_api/host/uhdf/
INCLUDE_DIRS += $(HDF_CORE_ROOT)/interfaces/inner_api/core/

INCLUDE_DIRS += $(HDF_FWK_HOME)/include/osal
INCLUDE_DIRS += $(HDF_FWK_HOME)/include/core
INCLUDE_DIRS += $(HDF_FWK_HOME)/include/platform
INCLUDE_DIRS += $(HDF_FWK_HOME)/support/platform/include
INCLUDE_DIRS += $(HDF_FWK_HOME)/support/platform/include/fwk
INCLUDE_DIRS += $(HDF_FWK_HOME)/include/utils
INCLUDE_DIRS += $(HDF_FWK_HOME)/utils/include

INCLUDE_DIRS += $(HDF_ADP_HOME)/uhdf2/osal/include
INCLUDE_DIRS += $(HDF_ADP_HOME)/uhdf2/include/host

# test includes
INCLUDE_DIRS += $(HDF_FWK_HOME)/test/unittest/platform/common

# posix implement
SRC_FILES += $(HDF_FWK_HOME)/utils/src/hdf_sref.c
#SRC_FILES += $(HDF_FWK_HOME)/utils/src/hcs_parser/device_resource_if.c
SRC_DIRS += $(HDF_FWK_HOME)/utils/src/hcs_parser
SRC_FILES += $(HDF_FWK_HOME)/support/platform/src/fwk/platform_queue.c
SRC_FILES += $(HDF_FWK_HOME)/support/platform/src/fwk/platform_device.c
SRC_FILES += $(HDF_FWK_HOME)/support/platform/src/fwk/platform_manager.c
SRC_FILES += $(HDF_FWK_HOME)/support/platform/src/fwk/platform_event.c
SRC_FILES += $(HDF_FWK_HOME)/support/platform/src/fwk/platform_common.c
SRC_FILES += $(HDF_FWK_HOME)/support/posix/src/osal_mem.c
SRC_FILES += $(HDF_FWK_HOME)/support/posix/src/osal_sem.c
#SRC_FILES += $(HDF_FWK_HOME)/support/posix/src/osal_thread.c
SRC_FILES += $(HDF_FWK_HOME)/support/posix/src/osal_time.c
SRC_FILES += $(HDF_FWK_HOME)/support/posix/src/osal_mutex.c
SRC_FILES += $(HDF_ADP_HOME)/platform/can/can_virtual.c

########################################## test targets ############################
# test targets
SRC_DIRS += $(HDF_FWK_HOME)/support/platform/src/can

########################################## test cases ##############################
# test cases
TEST_SRC_DIRS += $(LOCAL_DIR)/utdd/platform/can
TEST_SRC_DIRS += $(LOCAL_DIR)/utdd/platform/fwk
TEST_SRC_DIRS += $(LOCAL_DIR)/utdd/platform/mis
